<template>
  <div class="app-container">
    <el-form ref="form" :model="form" label-width="120px">
      <el-form-item>
        <el-link type="warning" disabled>绝不会以任何形式向第三方透露你的个人信息</el-link>
      </el-form-item>
    </el-form>
    <el-form ref="form" :model="form" label-width="120px">
      <el-form-item label="头像">
        <el-avatar shape="square" :size="50" :src="squareUrl"></el-avatar>
      </el-form-item>
      <el-form-item label="昵称">
        <el-input v-model="form.nickname" placeholder="请输入内容" />
      </el-form-item>
      <el-form-item label="常用邮箱">
        <el-input v-model="form.mail" placeholder="请输入内容" />
      </el-form-item>
      <el-form-item label="绑定手机">
        <el-input v-model="form.phone" placeholder="请输入内容" />
      </el-form-item>
      <el-form-item label="真实姓名">
        <el-input v-model="form.name" placeholder="请输入内容" />
        <el-link type="info" disabled>若不填写则默认为昵称</el-link>
      </el-form-item>
      <el-form-item label="性别">
        <el-radio-group v-model="form.sex">
          <el-radio label="男" />
          <el-radio label="女" />
        </el-radio-group>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">保存</el-button>
        <el-button @click="onCancel">取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        nikename: '',
        mail: '',
        phone: '',
        name: '',
        sex: ''
      },
      squareUrl: "https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png"//头像
    }
  },
  methods: {
    onSubmit() {
      this.$message('submit!')
    },
    onCancel() {
      this.$message({
        message: 'cancel!',
        type: 'warning'
      })
    }
  }
}
</script>

<style scoped>
.line{
  text-align: center;
}
</style>

